#include<stdlib.h>
#include<unistd.h>
#include<fcntl.h>
#include<sys/stat.h>
#include<stdio.h>
/*int main(){
	char buffer[128];
	int size;
	size=read(0,buffer,128);
	      if ((write(1,buffer,size))!=size)
			     // write(2,"Error Occured",14);
			      exit (0);

}*/
 int main(){
  FILE *inf,*outf;
	 int in, out,fd_no,c_f;
   char c ; 
  in=open("file.in",O_RDONLY);
  out=open("file.out",O_WRONLY);
  while(read(in,&c,1)==1)
  write(out,&c,1);
  inf=fopen("file2.out","r");
  outf=fopen("file.in","w");
  while ((c_f=fgetc(inf))!=EOF)
	  fputc(c_f,outf);
 fd_no=fileno(inf);
 printf("Filed Desc.:%d",fd_no);
  exit (0);

 }



